using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EFDemo
{

    public class Student 
    {

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        public string Password { get; set; }

        public string Name { get; set; }

        public bool IsValid { get; set; }

        public int Age { get; set; }

        public DateTime EnRollDate { get; set; }

        [Display(Name = "专业")]
        public List<StudentMajor> StudentMajor { get; set; }
    }

    public class Student2
    {

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        public string Password { get; set; }

        public string Name { get; set; }

        public bool IsValid { get; set; }

        public int Age { get; set; }

        public DateTime EnRollDate { get; set; }

    }

}
